package cn.wb.org.dto;

import cn.wb.org.domain.Shop;
import lombok.Data;

import javax.validation.Valid;
import java.util.Date;

@Data
public class ShopDto {
    private String name;
    private String tel;
    private String address;
    private String logo;
    @Valid
    private EmployeeDto admin;

    public Shop getShop() {
        return Shop.builder()
                .state(0)
                .registerTime(new Date())
                .address(this.address)
                .tel(this.tel)
                .logo(this.logo)
                .name(this.name)
                .build();
    }
}
